#include <stdio.h>
int main()
 {
    int a = 0, b = 0,i = 0;
    scanf("%d %d",&a,&b);
    int c = a ^ b;
    int count = 0;
    while(c)
    {
       c = c & (c - 1);
       count++;
    }
    printf("%d",count);
    return 0;
}
